package org.yuezejian.alarm.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Websocket资源参数
 *
 * @author yuezejian
 * @since 2024.8.1
 */
@Component
@ConfigurationProperties(prefix = "websocket")
public class WebsocketProperties {
    private List<PortConfig> client;

    public List<PortConfig> getClient() {
        return client;
    }

    public void setClient(List<PortConfig> client) {
        this.client = client;
    }

    // Getter and Setter

    public static class PortConfig {
        private int port;
        private String ip;

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }

        public String getIp() {
            return ip;
        }

        public void setIp(String ip) {
            this.ip = ip;
        }

    }
}

